﻿Public Class clsSysParam

    Public Function selectAgvSwitch() As DataTable
        Dim szSql As String = ""
        szSql &= "SELECT * FROM sf.t_sys_param WHERE param_key = ? "
        Dim dt As DataTable = DBacs.ExecuteSql(szSql, -1, "agv_switch")
        If IsNothing(dt) Then
            selectAgvSwitch = New DataTable
        Else
            selectAgvSwitch = dt
        End If
    End Function

    Public Function selectAgvWebSite() As DataTable
        Dim szSql As String = ""
        szSql &= "SELECT * FROM sf.t_sys_param WHERE param_key = ? "
        Dim dt As DataTable = DBacs.ExecuteSql(szSql, -1, "agv_website")
        If IsNothing(dt) Then
            selectAgvWebSite = New DataTable
        Else
            selectAgvWebSite = dt
        End If
    End Function

    Public Function Update(param_value As String, param_key As String) As Integer
        Dim szSql As String = String.Empty
        Dim rtn As Integer
        szSql &= "update sf.t_sys_param set param_value = ? where param_key = ? "
        rtn = DBacs.ExecuteUpdateSql(szSql, -1, param_value, param_key)
        Return rtn
    End Function
End Class
